# -*- coding: utf-8 -*-
from datetime import timedelta
from utils.operators.spark_submit import SparkSubmitOperator
from jms.dm.route.dm_route_main import dm__dm_route_main

dm__dm_route_main_check = SparkSubmitOperator(
    conn_id='spark_route',
    task_id='dm__dm_route_main_check',
    pool_slots=4,
    email=['zhangqinglin@jtexpress.com','yl_bigdata@yl-scm.com'],
    name='dm__dm_route_main_check',
    driver_memory='32G',
    executor_memory='8G',
    executor_cores=4,
    num_executors=80,
    jars='hdfs:///route/package/graphframes-0.7.0-spark2.3-s_2.11.jar,hdfs:///route/package/common-1.0-SNAPSHOT.jar',
    java_class='com.yunlu.bigdata.jobs.route.export.MainLineCheckExport',
    application='hdfs:///route/package/original-jobs-1.0-SNAPSHOT.jar',
    application_args=['{{ execution_date | cst_ds }}'],
    execution_timeout=timedelta(hours=1),
)

dm__dm_route_main_check << dm__dm_route_main
